package com.tengju.user.infrastructure.repository;

import com.tengju.user.domain.model.protocol.UserProtocol;
import com.tengju.user.domain.model.user.UserProtocolConfirmRepository;
import com.tengju.user.infrastructure.persistence.mybatis.dataobject.UserProtocolDO;
import com.tengju.user.infrastructure.persistence.mybatis.mapper.dealer.custom.UserProtocolMapper;
import com.tengju.user.infrastructure.repository.convert.UserProtocolConfirmConvert;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

@Repository
public class UserProtocolConfirmRepositoryImpl implements UserProtocolConfirmRepository {

    @Resource
    UserProtocolMapper userProtocolMapper;

    @Override
    public void store(UserProtocol userProtocol) {
        UserProtocolDO userProtocolDO = UserProtocolConfirmConvert.convertToDO(userProtocol);
        userProtocolMapper.insert(userProtocolDO);
    }
}
